﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Xsl;
using System.Xml;
using System.IO;
using System.Xml.XPath;

namespace Runda.CMS.Portal.WorkFlow
{
   public class Xslt
    {
        public Xslt()
        {
        }

        public static string transformHTML(string xmldoc, string xslname)
        {
            string str="";
            try
            {
                XslTransform transform = new XslTransform();
                transform.Load(xslname);
                XmlDocument document = new XmlDocument();
                document.LoadXml(xmldoc);
                StringBuilder sb = new StringBuilder("");
                StringWriter writer = new StringWriter(sb);
                transform.Transform((IXPathNavigable)document, null, (TextWriter)writer, null);
                str = sb.ToString();
            }
            catch (Exception exception1)
            {
           
            }
            return str;
        } 
    }
}
